﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="Web.Admin.Page_Field.Edit" %>

<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>

<!DOCTYPE html>

<%="<!--[if IE 8]> <html class=\"ie8 no-js\"> <![endif]-->"%>
<%="<!--[if IE 9]> <html class=\"ie9 no-js\"> <![endif]-->"%>
<%="<!--[if !IE]><!-->"%>
<html>
<%="<!--<![endif]-->"%>
<!-- BEGIN HEAD -->

<head>
    <meta charset="utf-8" />
    <title><%=Evan.Common.CommFun.GetAppSetting("AdminTitle") %> - 后台管理系统</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <!-- #include file="../include/com_res_css.inc" -->
</head>
<!-- END HEAD -->

<body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
    <!-- BEGIN HEADER -->

    <!-- #include file="../include/top_bar.inc" -->

    <!-- END HEADER -->
    <!-- BEGIN HEADER & CONTENT DIVIDER -->
    <div class="clearfix"></div>
    <!-- END HEADER & CONTENT DIVIDER -->
    <!-- BEGIN CONTAINER -->
    <div class="page-container">
        <!-- BEGIN SIDEBAR -->

        <!-- #include file="../include/left_menu.inc" -->

        <!-- END SIDEBAR -->
        <!-- BEGIN CONTENT -->
        <div class="page-content-wrapper">
            <!-- BEGIN CONTENT BODY -->
            <div class="page-content">
                <!-- BEGIN PAGE HEADER-->
                <!-- BEGIN THEME PANEL -->
                <!-- #include file="../include/theme_panel.inc" -->
                <h3 class="page-title"><%=CurChannel.Title %> - 字段管理</h3>
                <!-- END PAGE TITLE-->
                <!-- END PAGE HEADER-->
                <!-- BEGIN PAGE CONTENT-->

                <div class="portlet light bordered">
                    <div class="portlet-title tabbable-line">

                        <ul class="nav nav-tabs ">
                            <li class="active">
                                <a href="#tab_1" data-toggle="tab" aria-expanded="true">基本信息 </a>
                            </li>
                            <%--<li class="">
                                                    <a href="#tab_2" data-toggle="tab" aria-expanded="false"> SEO信息 </a>
                                                </li>
                                                <li class="">
                                                    <a href="#tab_3" data-toggle="tab" aria-expanded="false"> 模板信息 </a>
                                                </li>--%>
                        </ul>

                        <div class="caption">
                            <i class="glyphicon glyphicon-list-alt font-red"></i>
                            <span class="caption-subject font-red bold uppercase">字段管理</span>

                        </div>

                    </div>
                    <div class="tab-content">

                        <div class="tab-pane active" id="tab_1">
                            <div class="form">
                                <div class="form-horizontal form-row-seperated">
                                    <div class="form-body">

                                        <div class="form-group">
                                            <label class="control-label col-md-2 font-blue">系统预设字段</label>
                                            <div class="col-md-6">
                                                <div class="select2-bootstrap-prepend">
                                                    <select id="single-prepend-text" class="form-control select2 select2-allow-clear">
                                                        <option></option>
                                                        <option value="title">标题</option>
                                                        <option value="subtitle">副标题</option>
                                                        <option value="content">内容</option>
                                                        <option value="feditor">内容-Feditor</option>
                                                        <option value="subcontent">副内容</option>
                                                        <option value="entitle">英文标题</option>
                                                        <option value="author">作者</option>
                                                        <option value="links">链接</option>
                                                        <option value="froms">来源</option>
                                                        <option value="Intro">简介</option>
                                                        <option value="imgurl">图片上传</option>
                                                        <option value="indeximgurl">首页图</option>
                                                        <option value="bigimgurl">大图</option>
                                                        <option value="smallimgurl">小图</option>
                                                        <option value="photo">相册</option>
                                                        <option value="addtime">添加时间</option>
                                                        <option value="filepath">附件</option>
                                                        <option value="ishot">热门</option>
                                                        <option value="isindex">首页</option>
                                                        <option value="isred">推荐</option>
                                                        <option value="istop">置顶</option>
                                                        <option value="time-minute">时间选择</option>
                                                        <option value="click">点击数</option>
                                                        <option value="list">字段列表</option>
                                                    </select>
                                                </div>
                                                <span class="help-block">选择系统预设字段 , 信息自动填充 . <i class="font-red">注 : 编辑字段时不可选择</i></span>
                                            </div>
                                        </div>

                                        <% 
                                            Dictionary<string, string> FieldType = Evan.Common.HtmlHelper.GetFieldType();

                                            Dictionary<string, string> FieldVerify = new Dictionary<string, string>();
                                            FieldVerify.Add("notnull", "不为空");
                                            FieldVerify.Add("eword", "英文");
                                        %>

                                        <% 
                                            Evan.Model.SysModel.HtmlHelperModel m1 = new Evan.Model.SysModel.HtmlHelperModel { Title = "标题", PlaceHoder = "字段显示的标题", Notice = "字段在内容管理左侧显示的标题", FieldName = "Title", FieldVerify = "notnull", MaxLength = 25, FieldType = "input" };
                                            Evan.Model.SysModel.HtmlHelperModel m2 = new Evan.Model.SysModel.HtmlHelperModel { Title = "字段名称", PlaceHoder = "数据库对应的字段名称", Notice = "数据库对应的字段名称 , 非专业人士请勿修改", FieldName = "FieldName", FieldVerify = "notnull", MaxLength = 20, FieldType = "input" };
                                            Evan.Model.SysModel.HtmlHelperModel m3 = new Evan.Model.SysModel.HtmlHelperModel { Title = "字段类型", PlaceHoder = "字段显示的类型", Notice = "字段显示的类型", FieldName = "FieldType", FieldVerify = "notnull", MaxLength = 25, FieldType = "select", SelectItem = FieldType };
                                            Evan.Model.SysModel.HtmlHelperModel m4 = new Evan.Model.SysModel.HtmlHelperModel { Title = "字段大小", PlaceHoder = "数据库中对应字段类型的大小", Notice = "数据库中对应字段类型的大小 , 非专业人士请勿修改", FieldName = "FieldSize", FieldVerify = "notnull", MaxLength = 25, FieldType = "input" };
                                            Evan.Model.SysModel.HtmlHelperModel m5 = new Evan.Model.SysModel.HtmlHelperModel { Title = "字段验证类型", PlaceHoder = "字段验证类型", Notice = "针对文本框和文本域有效", FieldName = "FieldVerify", FieldVerify = "notnull", MaxLength = 25, FieldType = "multipleselect", SelectItem = FieldVerify };
                                            Evan.Model.SysModel.HtmlHelperModel m6 = new Evan.Model.SysModel.HtmlHelperModel { Title = "输入框内提示", PlaceHoder = "就是你现在看到的这个地方的提示", Notice = "输入框内没有内容的时候提示", FieldName = "PlaceHoder", FieldVerify = "notnull", MaxLength = 25, FieldType = "input" };
                                            Evan.Model.SysModel.HtmlHelperModel m7 = new Evan.Model.SysModel.HtmlHelperModel { Title = "最大输入大小", PlaceHoder = "字段允许输入的最大字数", Notice = "字段允许输入的最大字数 , 0为不限制", FieldName = "MaxLength", FieldVerify = "notnull", MaxLength = 25, FieldType = "input", DefaultValue = "0" };

                                            Evan.Model.SysModel.HtmlHelperModel m13 = new Evan.Model.SysModel.HtmlHelperModel { Title = "默认值", PlaceHoder = "字段显示的默认值", Notice = "字段在内容管理中默认的值 , 如果是多选可以英文逗号分开", FieldName = "DefaultValue", FieldVerify = "", MaxLength = 0, FieldType = "textarea", DefaultValue = "" };

                                            Evan.Model.SysModel.HtmlHelperModel m8 = new Evan.Model.SysModel.HtmlHelperModel { Title = "字段提示", PlaceHoder = "字段提示", Notice = "就是你现在看到的这个地方的提示", FieldName = "Notice", FieldVerify = "notnull", MaxLength = 200, FieldType = "input" };
                                            Evan.Model.SysModel.HtmlHelperModel m9 = new Evan.Model.SysModel.HtmlHelperModel { Title = "是否在列表显示", PlaceHoder = "列表", Notice = "是否显示在列表页", FieldName = "IsList", FieldVerify = "notnull", MaxLength = 25, FieldType = "switch" };

                                            Evan.Model.SysModel.HtmlHelperModel m14 = new Evan.Model.SysModel.HtmlHelperModel { Title = "是否显示", PlaceHoder = "显示", Notice = "是否显示在编辑页面 , 如果设置不显示 , 则隐藏在编辑页面中 . ", FieldName = "IsShow", FieldVerify = "notnull", MaxLength = 25, FieldType = "switch", DefaultValue = "1" };

                                            Evan.Model.SysModel.HtmlHelperModel m10 = new Evan.Model.SysModel.HtmlHelperModel { Title = "内容", PlaceHoder = "下拉或多选的内容", Notice = "下拉或多选的内容 , 每行代表一个值 , 格式 (key,value) 例如 (1,设置值) . [<a class='AdvRoleSetCont'>查看高级设置规则</a>] ", FieldName = "Content", MaxLength = 500, FieldType = "textarea", FieldVerify = "" };
                                            Evan.Model.SysModel.HtmlHelperModel m11 = new Evan.Model.SysModel.HtmlHelperModel { Title = "排序", PlaceHoder = "排序ID", Notice = "排序ID , 默认100", FieldName = "SortId", FieldVerify = "notnull", MaxLength = 10, FieldType = "input", DefaultValue = "100" };
                                            Evan.Model.SysModel.HtmlHelperModel m12 = new Evan.Model.SysModel.HtmlHelperModel { Title = "锁定", PlaceHoder = "锁定", Notice = "是否启用字段", FieldName = "States", FieldVerify = "", MaxLength = 25, FieldType = "switch" };
                                        %>

                                        <% List<Evan.Model.SysModel.HtmlHelperModel> mm = new List<Evan.Model.SysModel.HtmlHelperModel>();
                                            mm.Add(m1);
                                            mm.Add(m2);
                                            mm.Add(m3);
                                            mm.Add(m4);
                                            mm.Add(m5);
                                            mm.Add(m6);
                                            mm.Add(m7);

                                            mm.Add(m13);

                                            mm.Add(m8);
                                            mm.Add(m9);

                                            mm.Add(m14);

                                            mm.Add(m10);
                                            mm.Add(m11);
                                            mm.Add(m12);


                                        %>

                                        <% foreach (Evan.Model.SysModel.HtmlHelperModel item in mm)
                                            {
                                                Response.Write(Evan.Common.HtmlHelper.HtmlBuild(item));
                                            }
                                        %>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>


                    <div class="form-actions form-submit-row">
                        <div class="form-group">
                            <label class="control-label col-md-2"></label>
                            <div class="col-md-6">
                                <button type="button" class="btn green submit"><i class="fa fa-check"></i>提交</button>
                                <button type="button" class="btn default" onclick="JumpList();"><i class="fa fa-mail-reply"></i>返回</button>
                            </div>
                        </div>
                        <div class="clear"></div>
                    </div>

                </div>


                <!-- END PAGE CONTENT-->
            </div>
            <!-- END CONTENT BODY -->
        </div>
        <!-- END CONTENT -->

    </div>
    <!-- END CONTAINER -->

    <div class="AdvRoleSetContStr hide">
        <div style="max-height: 600px; overflow: auto;">
            <div style="height: auto">
                <div class="note note-info">
                    <h4 class="block">0. 多栏目绑定</h4>
                    <p>bind 语法 , 必须使用 bind- 开头 , bind-table-classid (bind[固定语法] , table[表名称] , classid[栏目id , 多个栏目使用,分隔]) , <b>绑定数据只取Id和Title字段 ,请确保被绑定表中有对应字段</b></p>
                    <br />
                    <p>示例 </p>
                    <pre>bind-article-1(单栏目)</pre>
                    <pre>bind-product-1,2,3(多栏目)</pre>
                </div>
                <div class="note note-info">
                    <h4 class="block">1. 常规数据绑定</h4>
                    <p>每行代表一个值 , 格式为 (key,value)  , 如果有多个选择项 , 可回车换行进行下一条数据输入 .</p>
                    <br />
                    <p>示例 </p>
                    <pre>1,选项一
2,选项二
3,选项三</pre>
                </div>
                <div class="note note-info">
                    <h4 class="block">2. 栏目ID绑定</h4>
                    <p>此方式直接填写对应的栏目ID即可 , <strong>但仅仅只调用指定栏目内容的 Id 和 Title , 请确保所绑定的栏目中存在 Id 和 Title</strong></p>
                    <br />
                    <p>示例 </p>
                    <pre>1</pre>
                </div>
                <div class="note note-info">
                    <h4 class="block">3. 高级栏目绑定</h4>
                    <p>此项可自定义需要绑定的数据 , 可指定绑定某一整个栏目 , 可配置绑定栏目本身数据还是栏目内容数据 , 使用JSON格式文本 . <strong>无论是单个栏目还是多个栏目需要绑定的话 , 都需要写成JSON数组的形式</strong></p>
                    <br />
                    <p>单个栏目示例</p>
                    <pre>[{
    "Content": "1,2,3",
    "SelectField": "Id,Title",
    "BindMode": "all",
    "Deep": "0",
    "BindType": "channel"
}]</pre>
                    <p>多个栏目示例</p>
                    <pre>[{
    "Content": "1,2,3",
    "SelectField": "Id,Title",
    "BindMode": "all",
    "Deep": "0",
    "BindType": "channel"
}, {
    "Content": "1,2,3",
    "SelectField": "Id,Title",
    "BindMode": "all",
    "Deep": "0",
    "BindType": "channel"
}]</pre>
                </div>

                <div class="note note-info">
                    <h4 class="block">4. 列表字段</h4>
                    <p>此项可自定义字段列表中的字段及其类型 , 使用JSON格式文本 . </p>
                    <br />
                    <p>字段示例<br />
                        <strong>字段类型支持 : input , textarea , imgupload , fileupload</strong></p>
                    <pre>[{
	"Field": "title",
	"Head": "标题",
	"Type": "input",
	"Tip": "这是字段提示",
	"Default": ""
}, {
	"Field": "desc",
	"Head": "简介",
	"Type": "textarea",
	"Tip": "这是字段提示",
	"Default": ""
}, {
	"Field": "img",
	"Head": "图片",
	"Type": "imgupload",
	"Tip": "1366*768",
	"Default": ""
}, {
	"Field": "file",
	"Head": "附件",
	"Type": "fileupload",
	"Tip": "这是字段提示",
	"Default": ""
}]</pre>
                    <p>默认值示例</p>
                    <pre>[{
	"title": "我是标题1",
	"desc": "我是简介1",
	"img": "/uploads/20200109013936_054257.jpg",
	"file": "/uploads/20200228055920_387278.jpg"
}, {
	"title": "我是标题2",
	"desc": "我是简介2",
	"img": "/uploads/20200109013936_054257.jpg",
	"file": "/uploads/20200228055920_387278.jpg"
}, {
	"title": "我是标题3",
	"desc": "我是简介3",
	"img": "/uploads/20200109013936_054257.jpg",
	"file": "/uploads/20200228055920_387278.jpg"
}, {
	"title": "我是标题4",
	"desc": "我是简介4",
	"img": "/uploads/20200109013936_054257.jpg",
	"file": "/uploads/20200228055920_387278.jpg"
}]</pre>
                </div>

            </div>
        </div>
    </div>

    <!-- #include file="../include/footer.inc" -->
    <!-- #include file="../include/com_res_js.inc" -->
</body>
<script type="text/javascript">
    var model = <%=(Evan.Model.ConvertModel.ConvertToJson(Model))%>;
    SetModel(model);
    model.ClassId = GetQs("classid");
    $(function () {

        $(".AdvRoleSetCont").on("click", function () {
            bootbox.dialog({
                message: $(".AdvRoleSetContStr").html(),
                title: "高级设置规则",
                buttons:
                {
                    main:
                    {
                        label: "关闭",
                        className: "blue",
                        callback: function () { }
                    }
                }
            });
        });

        if (IsEditAction()) {
            $("input[field='FieldName'],[field='FieldSize']").attr("readonly", "readonly");
            $("#single-prepend-text").prop("disabled", true);
        }
        else {
            Switch_State($("input[field=IsShow]"), true);
        }
    });

    var FieldPreSet = [
        { "Flag": "title", "Title": "标题", "FieldName": "Title", "FieldType": "input", "FieldSize": "1000", "FieldVerify": ",notnull,", "PlaceHoder": "请输入标题", "MaxLength": "100", "DefaultValue": "", "Notice": "标题", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "subtitle", "Title": "副标题", "FieldName": "SubTitle", "FieldType": "input", "FieldSize": "1000", "FieldVerify": ",,", "PlaceHoder": "请输入副标题", "MaxLength": "100", "DefaultValue": "", "Notice": "副标题", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "content", "Title": "内容", "FieldName": "Content", "FieldType": "editor", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请输入内容", "MaxLength": "0", "DefaultValue": "", "Notice": "请输入内容", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "feditor", "Title": "内容Feditor", "FieldName": "Content", "FieldType": "feditor", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请输入内容", "MaxLength": "0", "DefaultValue": "", "Notice": "请输入内容", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "subcontent", "Title": "副内容", "FieldName": "SubContent", "FieldType": "editor", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请输入内容", "MaxLength": "0", "DefaultValue": "", "Notice": "请输入内容", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "entitle", "Title": "英文标题", "FieldName": "EnTitle", "FieldType": "input", "FieldSize": "2000", "FieldVerify": ",,", "PlaceHoder": "请输入英文标题", "MaxLength": "0", "DefaultValue": "", "Notice": "请输入英文标题", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "author", "Title": "作者", "FieldName": "Author", "FieldType": "input", "FieldSize": "2000", "FieldVerify": ",,", "PlaceHoder": "请输入作者", "MaxLength": "0", "DefaultValue": "", "Notice": "请输入作者", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "links", "Title": "链接", "FieldName": "Links", "FieldType": "input", "FieldSize": "2000", "FieldVerify": ",,", "PlaceHoder": "请填写链接", "MaxLength": "0", "DefaultValue": "javascript:;", "Notice": "请填写链接 , 如果是外链 , 请加上 http:// (如果是https请加上https://)", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "froms", "Title": "来源", "FieldName": "Froms", "FieldType": "input", "FieldSize": "2000", "FieldVerify": ",,", "PlaceHoder": "请输入来源", "MaxLength": "0", "DefaultValue": "", "Notice": "请输入来源", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "Intro", "Title": "简介", "FieldName": "Intro", "FieldType": "textarea", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请输入简介", "MaxLength": "0", "DefaultValue": "", "Notice": "请输入简介", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "imgurl", "Title": "图片上传", "FieldName": "ImgUrl", "FieldType": "imgupload", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请上传图片", "MaxLength": "0", "DefaultValue": "", "Notice": "图片尺寸：00 px * 00 px", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "indeximgurl", "Title": "首页图", "FieldName": "IndexImgUrl", "FieldType": "imgupload", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请上传首页图", "MaxLength": "0", "DefaultValue": "", "Notice": "图片尺寸：00 px * 00 px", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "bigimgurl", "Title": "大图", "FieldName": "BigImgUrl", "FieldType": "imgupload", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请上传大图", "MaxLength": "0", "DefaultValue": "", "Notice": "图片尺寸：00 px * 00 px", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "smallimgurl", "Title": "小图", "FieldName": "SmallImgUrl", "FieldType": "imgupload", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请上传小图", "MaxLength": "0", "DefaultValue": "", "Notice": "图片尺寸：00 px * 00 px", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "photo", "Title": "相册", "FieldName": "Photo", "FieldType": "multipleimgupload", "FieldSize": "4000", "FieldVerify": ",,", "PlaceHoder": "请上传相册图", "MaxLength": "0", "DefaultValue": "", "Notice": "图片尺寸：00 px * 00 px", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "addtime", "Title": "添加时间", "FieldName": "AddTime", "FieldType": "time", "FieldSize": "1000", "FieldVerify": ",,", "PlaceHoder": "请选择上传时间", "MaxLength": "0", "DefaultValue": "", "Notice": "请选择上传时间", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "time-minute", "Title": "时间选择", "FieldName": "TimeMinute", "FieldType": "time_minute", "FieldSize": "1000", "FieldVerify": ",,", "PlaceHoder": "请选择时间", "MaxLength": "0", "DefaultValue": "", "Notice": "请选择时间", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "filepath", "Title": "附件", "FieldName": "FilePath", "FieldType": "fileupload", "FieldSize": "2000", "FieldVerify": ",,", "PlaceHoder": "请选择上传文件", "MaxLength": "0", "DefaultValue": "", "Notice": "请选择上传文件", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "ishot", "Title": "是否热门", "FieldName": "IsHot", "FieldType": "switch", "FieldSize": "1000", "FieldVerify": ",,", "PlaceHoder": "热门", "MaxLength": "0", "DefaultValue": "0", "Notice": "是否热门", "IsList": "1", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "isindex", "Title": "是否首页", "FieldName": "IsIndex", "FieldType": "switch", "FieldSize": "1000", "FieldVerify": ",,", "PlaceHoder": "首页", "MaxLength": "0", "DefaultValue": "0", "Notice": "是否首页", "IsList": "1", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "isred", "Title": "是否推荐", "FieldName": "IsRed", "FieldType": "switch", "FieldSize": "1000", "FieldVerify": ",,", "PlaceHoder": "推荐", "MaxLength": "0", "DefaultValue": "0", "Notice": "是否推荐", "IsList": "1", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "istop", "Title": "是否置顶", "FieldName": "IsTop", "FieldType": "switch", "FieldSize": "1000", "FieldVerify": ",,", "PlaceHoder": "置顶", "MaxLength": "0", "DefaultValue": "0", "Notice": "是否置顶", "IsList": "1", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "click", "Title": "点击数", "FieldName": "Click", "FieldType": "input", "FieldSize": "1000", "FieldVerify": ",,", "PlaceHoder": "请填写点击数", "MaxLength": "0", "DefaultValue": "0", "Notice": "请填写点击数 , 默认每次访问都会加1", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
        , { "Flag": "list", "Title": "列表", "FieldName": "FieldList", "FieldType": "list", "FieldSize": "0", "FieldVerify": ",,", "PlaceHoder": "请上传数据", "MaxLength": "0", "DefaultValue": "[]", "Notice": "请上传数据", "IsList": "0", "IsShow": "1", "Content": "", "SortId": "100", "States": "1" }
    ];



    $("#single-prepend-text").on("change", function () {
        var field = $(this).val();
        var FieldJson = $.grep(FieldPreSet, function (value) {
            return value.Flag == field;
        });
        if (FieldJson.length == 1) {
            SetModel(FieldJson[0]);
        }
    })
</script>
</html>
